package com.heima.admin.controller.v1;

import com.heima.api.user.IUserClient;
import com.heima.model.common.dtos.PageRequestDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserRealnameDto;
import com.heima.model.user.pojos.ApUserRealname;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/auth")
public class AuthController {
    @Autowired
    private IUserClient userRealnameClient;
    @PostMapping("/list")
    public PageResponseResult list(@RequestBody ApUserRealnameDto dto) {
        return userRealnameClient.list(dto);
    }

    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody ApUserRealnameDto dto) {
        return userRealnameClient.authFail(dto);
    }

    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody ApUserRealnameDto dto) {
        return userRealnameClient.authPass(dto);
    }
}
